LinearBarcodeShape PrintRatio
Gets or sets the print ratio of the linear barcode shape. The print ratio defined as the ratio between the widths of wide and narrow bars or spaces
public float PrintRatio {get;Set} |
Return value
float | Print Ratio |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetJumpSpeed(2000);
vectorImage.SetJumpDelay(100);
vectorImage.SetMarkDelay(100);
//Set Laser Delays
vectorImage.SetLaserOnDelay(10);
vectorImage.SetLaserOffDelay(10);
LinearBarcodeShape lnBarcode = new LinearBarcodeShape();
lnBarcode.BarcodeType = BarcodeType.Codabar;
lnBarcode.Angle = 0;
lnBarcode.FlipHorizontally = false;
lnBarcode.FlipVertically = false;
lnBarcode.Height = 4;
lnBarcode.Width = 6;
lnBarcode.InvertImage = false;
lnBarcode.Location = new Point3D(0, 0, 0);
lnBarcode.MarkingOrder = MarkingOrder.HatchBeforeOutline;
lnBarcode.PrintRatio = 3;
lnBarcode.QuietZone = false;
lnBarcode.Text = "1234567890";
lnBarcode.HatchPattern = BarcodeHatchPattern.CreateLineHatchPattern(0.01f, true, false);
vectorImage.AddBarcode(lnBarcode);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "StartLogging(\"192.168.137.1\", 5032)\r\n ScanAll()"));
try
{
scanDocument.StartScanning();
}
catch
{
}
}